package com.admin.qanda;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import com.vo.QnABoardVO;


public class AdminLogic {
	Logger logger = Logger.getLogger(AdminLogic.class);
	private SqlMapAdminDao sqlMapAdminDao =null;
	public void setSqlMapAdminDao(SqlMapAdminDao sqlMapAdminDao) {
		this.sqlMapAdminDao = sqlMapAdminDao;
	}
	public void write(Map<String, Object> pMap) {
		logger.info("===[[AdminLogic boardInsert call]]===");
		sqlMapAdminDao.write(pMap);
	}
	public List<HashMap> getBoardList() {
		logger.info("===[[AdminLogic getBoardList call]]===");
		List<HashMap> bList = null;
		bList = sqlMapAdminDao.getBoardList();
		return bList;
	}
	public QnABoardVO boardDetail(int seq) {
		QnABoardVO qVO = null;
		try {
			//select
			qVO = sqlMapAdminDao.boardDetail(seq);
		} catch (Exception e) {
			throw e;
		}
		return qVO;
	}
	public void answer(Map<String, Object> pMap) {
		sqlMapAdminDao.answer(pMap);
		
	}
	public void answercheck(Map<String, Object> pMap) {
		sqlMapAdminDao.answercheck(pMap);
		
	}
	public void delete(Map<String, Object> pMap) {
		sqlMapAdminDao.delete(pMap);
		
	}
}